Development environment for data transformation applications

ABSTRACT

An environment and method for developing dataflow applications where a dataflow transformation is encapsulated into a dataflow graph expressed as a reusable map component using a host development language such as Java®, and the dataflow graphs are linked together via ports. A scalar map component performs a specific data transformation and a composite map component is built from a number of other map components typically representing a family of data transformations. Map components have interface and implementation properties which assist in developing customized, hierarchical data transformation logic. The ports are polymorphic and can be specific, generic, or composite data types, to allow linking of map components which compile to generate a dataflow pattern. A map component may employ dynamic logic where internal sub-graphs or links are added or properties changed based on information received from the compiler, such as port types, design properties, or static data transformation.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a system and method for managing datawhich includes data transformation, such as data warehousing, dataanalysis or similar applications. In particular, the invention relatesto the synthesis from dataflow graphs of computationally efficientexecutable applications well suited for parallel execution.

2. Description of the Related Art

The following descriptions and examples are not admitted to be prior artby virtue of their inclusion within this section.

Business processes are collecting ever-increasing amounts of data. Thenumber of interaction points where data is collected is increasing andthe amount of data collected at each point is increasing. Collected datais being retained for longer periods of time resulting in continualdatabase growth. Data processing in a business process takes a varietyof forms, such as data warehousing, decision support software,analytical software, customer relationship management. Such dataprocessing invariably involves transforming the data for use.

Business processes are also increasingly going “real-time.” This trendhas an interesting side effect. As business processes become moredependent on near continuous refresh of data, they become less tolerantof transition periods.

Refresh transition occurs when the data changes. Multiple, related setsof data from multiple sources must be refreshed in a consistent mannerwith respect to time. The more dependent business processes are onup-to-date data, the smaller the time windows for updates. Decreasingtime windows in conjunction with increasing amounts of data presents aprocess execution scalability problem.

Schema transition occurs when the type of data collected changes.Business processes and partnerships evolve and integrate inunpredictable ways. The more dependent business processes are onup-to-date data, the smaller the time windows for implementing change.That is, scalability is not limited by physical storage of data, but byapplications to transform the data for business use. This presents aprocess development scalability problem, as well as an executionscalability problem. The challenge then is to lower the cost ofdevelopment of data routing and transformation applications while at thesame time, providing scaleable execution environments to respond to theever increasing data flows and shrinking response time windows.

Dataflow graphs are widely recognized as an effective means to specifydata processing software. Their value lies in the succinct presentationand explicit definition of data transfers as the data progresses througha chain of transformation processes. Such dataflow graphs typicallyrepresent transformation processes as nodes having input and outputports, with the connections between nodes represented by arcs specifyingsources and destinations for data transfer. The nodes may behierarchical, with a single node at a high level representing a summaryof a dataflow graph which can be decomposed into lower-level nodes andarcs, until primitive data transformations are presented at the lowestlevel of the hierarchy. The dataflow representation is found to beespecially apt for multi-threaded execution environments such asparallel processing.

With the wider availability of parallel processing, such asshared-memory multiprocessor (SMP) machines, clustered or distributedmachines connected by networks, and single CPU machines executingmultiple threads, the need for cost-effective and time-efficientprogramming methods for such execution environments is becomingincreasingly important. The current state of the art in computerarchitecture design is shifting towards hyper-parallel computing. Allthe major CPU providers have embraced two trends, hyper-threading, andmultiple core chips.

Hyper-threading is the ability for a single CPU core to execute multiplethreads simultaneously by interleaving them in the hardware'sinstruction pipeline. The typical CPU instruction pipeline has grown inlength such that a single thread cannot keep the pipeline full.Interleaving instructions from multiple threads is the logical nextstep.

Multiple core chips are the result of ever increasing chip real estatedue to shrinking circuit size. It is equivalent to shrinking a multipleprocessor SMP server onto a single piece of silicon. For example, SunMicrosystems plans to have a single chip with 8 cores, with each corecapable of executing 4 threads simultaneously. This is the equivalent ofa 32-processor machine on 1 chip. This would enable a 64-processormachine to execute 64*32=2048 threads in parallel. Server hardwareperformance is set to expand rapidly for those applications that cantake advantage of hyper-parallel computing.

As used herein, “multi-threading” is intended to include multiple corearchitectures, i.e. a distinction is not made between parallelprocessing architectures such as SMP machines or a single CPU machineexecuting multiple threads. The current invention is applicable to allparallel processing architectures, e.g. a “thread” might be a process ona CPU in a multi-core SMP machine.

The future of data integration will require both scalability in processexecution and also scalability in process development. Parallelprocessing is a primary approach to execution scalability yet ittypically increases the complexity of development. The paradox arisesfrom the requirement of developing robust, complex, parallelapplications in ever diminishing time frames.

Since they are found to be effective, dataflow graphs have been used forboth the specification and design of computer software as well as fordocumentation, user application training, and supporting codemaintenance or modification activities. Further attempts have been madeto use dataflow graphs as the basis for code synthesis. The goal hasbeen to design the software using the dataflow graph representation andthen use the resulting graphs to synthesize code for execution byassociating software library functions in imperative languages orobjects in declarative languages with the nodes of the dataflow graph.Difficulties encountered with prior implementations are limitedflexibility/expressive power in component linking such that 1) Not allrepeating dataflow patterns can be encapsulated in reusable componentssuch that end users quite often have to “reinvent” those patterns ineach application. 2) Sub-partitioning hierarchical dataflows becomesprohibitively expensive when attempting to utilize alternativedimensions of parallelism.

The result has been that while dataflow graphs are widely used forsystem specification and design, and attempts have been made tosynthesize code from such dataflow graphs, the two goals of processdevelopment scalability and process execution scalability have yet to besimultaneously achieved.

Previous attempts to synthesize code directly from dataflow graphsachieve execution scalability but do so only in limited cases where thedimensions of parallelism exploited match well with the limited degreesof parallelism exposed. Many real world cases are excluded due to thelimited flexibility/expressive power in component linking thus impactingreuse and ultimately development scalability.

Alternatively the production code is sometimes written in a separateprocess from the dataflow design stage. Such an approach is acceptableif the pace of business process change is slow enough to allowhigh-performance production code to be written, by hand, after thesystem design is complete.

There exists, however, a significant and growing class of data intensivehigh-performance applications where both approaches above areunacceptable. That is, there is a significant class of applications forwhich the delay between requirements change and working high-performanceimplementation must be minimized. These are the applications that arebased on the growing flood of real-time data. When schema transition ofreal-time data occurs, the business processes dependent on that datacannot go off-line. New implementations, based on the new schema, mustbe available. The development of high-performance production code mustnot become the bottleneck in real-time business process change. In thesecases, both the cost and time for creation of the code and its executiontime must be held to a minimum. To minimize the cost and time of codecreation, a generic hierarchical dataflow representation of the systemmust be retained at design time. This representation must be then beautomatically transformed into a parallel, type-specific,non-hierarchical representation for efficient execution.

An example of a dataflow graph development system is found in U.S. Pat.No. 5,999,729. An example of a deadlock resolution system in amulti-threaded environment is found in U.S. Pat. No. 6,088,716. Deadlockdetection and correction in process networks are known, see, R. Stevens,M. Wan, P. Laramie, T. Parks & E. Lee, Implementation of ProcessNetworks in Java, http://www.ait.nrl.navy.mil/pgmt/PNpaper.pdf, July1997. An example of a parallel programming environment is found in U.S.Pat. No. 6,311,265. All references cited herein are incorporated byreference.

It would therefore be a significant advantage if the cost-effectivenessof the graphical dataflow representation for design could be used tosynthesize executable code with performance adequate for short-termproduction.

SUMMARY OF THE INVENTION

The problems with the synthesis of computationally efficient datatransformation applications from dataflow graphs outlined above areaddressed by the system and methods provided herein. The system andmethod herein provides for dataflow application development particularlysuited for parallel architectures when the synthesis process isdecomposed into a sequence of steps. The systems and methods hereof areparticularly useful when data must be processed or examined quickly andefficiently and scalability in design as well as execution is important.

The system and methods described herein center on the decomposition ofthe synthesis task into a sequence of steps such that a dataflowapplication is not generated immediately from a map component which hasbeen created by the application designer. Rather, the designer workswith a map component editor which manipulates iconic objects by usinggraphical and text editors and importing map components from librariesof existing maps. Some of these map components may be encrypted, thirdparty data transformations. These iconic map components do not presentthe user with the internal details of the maps which are imported fromthe library, nor the properties of new map components as assembled bythe user. In this way, the application designer is relieved of the taskof tracking and specifying low-level details which are not needed atthis stage of the synthesis process. The output from this step of theuser design activity is, thus, a hierarchical map appropriate to thedesired data processing task, but without low-level details ofimplementation.

Broadly speaking the invention contemplates a method for developing adataflow application where one or more data transformations is developedusing a host language and several data transformations having ports areassembled into a map component with links between ports using adeclarative language for static assemblage and a host language fordynamic assemblage. The host language for data transformation logic inthe preferred embodiment is Java. One or more map components arecompiled with syntactic and semantic analysis and the compiled mapcomponents are synthesized into an executable dataflow applicationincluding removing the design time links between ports.

Preferably, some of the map components comprise a plurality of other mapcomponents arranged hierarchically, while some of the map components arestatic which consistently generate the same hierarchical map, while someof the map components are dynamic to generate different hierarchicalmaps dependent on properties and dynamic logic.

In one version, the invention contemplates a dataflow applicationdevelopment environment where map components are selected from aplurality of reusable map components each representing one or more datatransformations. The selected map components are visually assembled intoa dataflow application, patterns of parallelism recognized, and at leastsome of the components executed in parallel by assigning a number ofthreads to a respective number of data transformations.

BRIEF DESCRIPTION OF THE DRAWINGS

Other objects and advantages of the invention will become apparent uponreading the following detailed description and upon reference to theaccompanying drawings in which:

FIG. 1 shows a block diagram of a data management system in accordancewith the present invention;

FIG. 2A is a flow diagram showing the creation and re-use of components,while FIG. 2B is a connected flow diagram showing the execution of adataflow diagram;

FIG. 3 is a flow diagram illustrating creation of a map componentsource;

FIG. 4 is a block diagram showing the structure of a map componentsource;

FIG. 5 is a flow diagram of the assembly process of a map component;

FIG. 6 is a block diagram of the structure of the XML file resultingfrom FIG. 5;

FIG. 7 is a flow chart of the map component loading process;

FIG. 8 is a flow diagram of the process for creating a map interfaceobject;

FIG. 9 is a block diagram showing the structure of a map interfaceobject;

FIG. 10 is a flow chart of the map synthesizer;

FIG. 11 is a block diagram illustrating the structure of a map object;

FIG. 12 is a block diagram showing the execution plan;

FIG. 13 is a flow chart illustrating the load map processes and set upinternal data structures;

FIG. 14 is a flow diagram depicting the routine for executing a preparedmap object;

FIG. 15 is a component diagram of an example of an application employingtwo maps;

FIG. 16 is the internal dataflow graph for the Flat File Reader map ofFIG. 15;

FIG. 17 is a diagram illustrating the internal dataflow graph of theText Split map of FIG. 16;

FIG. 18 is a block diagram showing an application that joins data fromtwo flat files;

FIG. 19 is a diagram depicting the internal dataflow graph of the Joinmap of FIG. 18;

FIG. 20 is a block diagram showing an application using four maps thatlink sub-ports of a hierarchical composite port;

FIG. 21 is a flow diagram showing a hierarchy of maps implementing abinary half-adder as an example of map synthesis using recursion;

FIG. 22 is a functional diagram illustrating an application with threemaps wherein one map is a map template that takes as a property anothermap;

FIG. 23 is a block diagram showing a dataflow synthesis process appliedto FIG. 22;

FIG. 24 is a block diagram illustrating the elimination of design timemap links from FIG. 23;

FIG. 25 is a block diagram showing an implementation of a partitionedjoin;

FIG. 26 is a block diagram illustrating the elimination of design timemap links from FIG. 25;

FIG. 27 is a functional diagram of an application employing five mapswith differing data partitioning schemes;

FIG. 28 is a block diagram illustrating a synthesis process applied toFIG. 27 correcting schema mismatch;

FIG. 29 is a block diagram showing the pattern generated from thesynthesis process applied to FIG. 27 when executing on a cluster; and

FIG. 30 is a diagram of a generic process network.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims.

DETAILED DESCRIPTION OF THE INVENTION I. Overview

A. Architecture

The data management system of the present invention uses componentarchitecture to manage the complexity of development and maintenance ofdataflow applications. It also uses compiler techniques to transform thecomponents into a form that enables efficient, parallel, execution. Moreexplicitly, all dataflow applications created by developers using thedata management system are assembled either of components createdinternally or from components delivered by a third party.

Data management system 10 has four packages (see FIG. 1): the compiler12, a set of low level programmatic tools for the development andmaintenance of the components; the executor 14, a set of low level toolsfor high performance execution of parallel dataflow applications; acomponent library 16, a repository for system, internal, and third partycomponents; and finally a set of high level programmatic, command lineand GUI tools 18 to facilitate access to the functionality of thecompiler, the executor, and the component library.

Data management system 10, as a component based development frameworksupports both extensibility and re-use of components. Extensibilitymeans the ability to add new components without having to neither changenor recompile existing system code or the code of existing components.Re-use means the ability to use existing components when building newcomponents or applications. In the data management system, a dataflowapplication is also a component. Thus, in the data management system,re-use means the ability to use existing components when creating newcomponents (this is also known as composition). The data managementsystem offers a declarative language API to build components as well asa host language class library to customize components and to develop andexecute new components.

Data management system 10 requires, in addition to its own packages, ahost language development environment (currently Java), a third partyenvironment required to develop the host language components as needed(in many useful cases, new map components will not require thedevelopment of host language components). Thus, the data managementsystem's development and execution environment is a hybrid of providedtools and languages and the host language development environment.

In data management system 10, either flat dataflow graphs or compositedataflow graphs are used to represent dataflow applications. The datamanagement system calls such composite dataflow graphs “maps.” Thus, amap is a composite dataflow graph whose internal nodes denote compositetransformations and nodes at the leaves denote atomic transformations.Parent to child edges denote component ownership and port to port edgesdenote dataflow links.

The composite transformations are encapsulated into map components usinga declarative, proprietary language. The atomic transformations areencapsulated into host language components (i.e. Java beans in thecurrent implementation). Thus, another way to think of a map in the datamanagement system is as an assembly of map components and host languagecomponents. It should be evident that because the map is a componentitself, the composition of maps is also a component. Therefore, datamanagement system 10 supports arbitrary composition levels and map'sinternal structure is, in general, a tree of sub-maps.

However, map components in the data management system can represent morethan simply static intermediate levels of composite dataflow graphs. Ingeneral, they are powerful, easy to use, configurable specifications offamilies of transformations (i.e. map families). That is a map componentcan potentially encapsulate an infinite set of related maps and tochoose a given map, the map component user must bind the component'sproperties to appropriate values.

The map component is a configurable specification of a hierarchicaldataflow map family. A map component will have in general two lists ofproperties: interface properties and implementation properties. Theseproperties are the “configuration knobs” that allow users to tweak givenmap components to get exactly the map they need. These propertiesultimately control behavior of logic expressed in the host language(i.e. Java) which in turns customizes the statically declared partialstructure of a given map interface and implementation.

The combination of a statically declared interface and implementationplus configurable logic allows encapsulating a potentially infinite setof related hierarchical maps. However, supporting this configurablelogic forces a lifecycle where the final hierarchical map is produced ina multi step fashion

The priorities of the Data Management System hereof are:

-   -   [0] Integrity of resulting code;    -   [1] Computational speed at execution time;    -   [2] Complexity hiding;    -   [3] Supporting ease of re-use;    -   [4] Security;    -   [5] Ease of use.

FIGS. 2A and 2B summarize the lifecycle of the creation and execution ofa dataflow application in accordance with a preferred embodiment of thepresent invention and are useful in understanding the high levelarchitecture hereof. A map component lifecycle starts when the mapcomponent developer creates a map component source (MCS file 201), anXML file (FIG. 2A). The MCS file can represent a family of one, in whichcase the specification is a declarative program indicating a completedataflow graph, or a family of N, in which case the specification has adeclarative part and another part composed of configurable host languageprocedural components. In any case, the finalized MCS file 201 is aconfigurable specification that, given particular bindings of availableproperties, indicates how internal components are linked to obtain afinal, complete, dataflow graph, i.e. a “map.”

When the developer is done creating the MCS file, then a tool called“map component assembler” 203 is used to generate a map component file(MC file 205), also an XML file, which contains a clear textdocumentation section as well as an encrypted section. MC files 205 arethe encrypted image of map components. MCS files 201 cannot be useddirectly to drive the data management system engine. MC files 205 areused instead. Once an MC file 205 is created, its MCS file 201 is nolonger required in all subsequent lifecycle processes. Thus, in a way,MCS files are to mc files what java source files are to java classfiles.

As shown in FIG. 2A, MC files 205 are loaded using the “map componentloader” 207 along with a class path used by the loader to find internalcomponents. The loader produces a map component object 209.

The map component object 209 encodes a family of maps and needs to beconfigured to produce the required map. The map component offers in itsdocumentation and properties section information on how to configure itin order to get the desired map (i.e. at 211). The first step inobtaining the map is to obtain the appropriate “map interface,” i.e. theobject that describes which ports the final map will have. For thispurpose, the developer uses the map component object 209, along with alist of interface-property-name/interface-property-value pairs, as inputto the “map interface synthesizer” tool 213. This tool then generatesthe “map interface object” 215 corresponding to the given map componentobject/interface configuration input. The “map interface object” now canbe queried to learn about its ports. If the developer is not satisfiedwith the ports then she reconfigures the map component object andre-synthesizes its map interface until satisfied.

If the developer is satisfied then she proceeds to generate the finalmap. Thus, she gives the map interface object 215 along with a list ofimplementation-property-name/implementation-property-value pairs, to the“map synthesizer” tool 217. The map synthesizer 217 then validates thatall internal links among internal components generated by the givenimplementation configuration are correct semantically and syntactically.Some of the tests done are with respect to linking semantics (i.e. aninput cannot be linked from two source outputs, etc.) and with respectto port type semantics (i.e. a string port type cannot be linked to along port type). The map synthesizer 217 also does port type propagationwhenever two port types are linked polymorphically (i.e. a long porttype when linked to a generic port type causes the generic to betransformed to long). If the map synthesizer 217 encountered no errorsit then outputs a “map object” 219.

The map object 219 contains a concrete, complete, correct, map. Thedeveloper can query the map object with respect to its ports as well asits implementation. The map component displays this information in XMLformat. Note that a map component developer may have directed the datamanagement system not to expose a map implementation when she built itsMCS file 201. If the map component from which the map is derived isopen, then the map object 219 will show its implementation as well asthe implementation of all open internal maps.

The map object 219 is the last object produce by the design time tools(a/k/a compiler tools, see, e.g. FIG. 1, Compiler 12). Therefore, thedesign time tools are: map component assembler 203, map component loader207, map interface synthesizer 213, and map synthesizer 217. Forexecution, two more tools, explained below, are needed.

If the map represented by the map object 219 has no inputs or outputsthen it is a “dataflow application” and can be executed. However, beforeit can be executed it has to be “prepared” by passing it to the “planpreparer” 221, another tool (FIG. 2B). The plan preparer 221, ifeverything is ok, then produces a “prepared map object.” The preparedmap object 223 can then be queried with respect to which runtimeproperties it supports. To proceed with execution the user then givesthe prepared map object along with a list ofruntime-property-name/runtime-property-value pairs to the executor 14.

The executor 14 then proceeds to create its internal data structures tosupport scheduling of each map process in the plan in its own thread, toautomatically create and manage high performance, typed, queues fordataflow communication channels among map process executor ports, aswell to automatically manage deadlock detection and resolution (theactual transformation procedures happen in the map process host languagecomponents, i.e. java beans. Map process developers need never worryabout concurrent/parallel programming constructs and pitfalls since theexecutor 14 manages that for them). When the executor 14 is done,control is returned to the calling client code, which can re-configurethe prepared map object and execute the new configuration again.

B. Functionality

Conceptually, in the dataflow model of computation, an application isalways organized as a graph. The nodes of the graph are datatransformation processes that have input and output ports. The edges aredata pipes that connect output ports to input ports.

Dataflow is the industry standard architecture for achieving scalabilityof applications with respect to added computing power. This has beenrefined into a set of patterns, ideas, and engineering practices knownas “component based development.” In this view, applications areassembled from a set of pre-existing “components.”

Conceptually, component based development partitions an application intoloosely coupled “components.” The components have “properties” that arebound to values that make sense to the particular application and inturn configure the component to function as desired. Additionally, thecomponents are assembled following a pre-defined set of “composition”rules. Component based development is the industry standard architecturefor lowering the cost of application development.

A synergy exists between dataflow and component architectures. Dataflowgraphs can be organized using the “composite pattern.” Once a compositepattern is formed, then every level of a composite dataflow graph can beencapsulated into its own component. Thus, a dataflow component issimply a specification of a certain level of a dataflow graph. Theproperties of such a component then become ways to customize the graphat that level. The port to port links from higher levels to theparticular level being encapsulated become the ports of the component.

Once a composite dataflow level has been encapsulated into a componentit can be used as black box re-use in any other dataflow compositegraph. The examples in FIGS. 15-29 illustrate these concepts.

The potential synergy between component architectures and executionscalability when using dataflow is striking. Prior dataflow systemseither failed to see that connection or had other reasons not to fullyrealize it. As a result, such prior dataflow systems are not balanced:sometimes they stress ease of development while other stress executionscalability.

On the other hand, data management system 10 of the present inventionhas a framework with the following attributes:

-   -   Ease of re-use of dataflow transformations    -   Ease of assembly of components    -   Low usage of memory and other operating system resources    -   Standards based implementation    -   Operating system portability    -   High performance, system managed parallel, execution

The first two priorities address the need for lowering development costsand time to market pressures. The next three address the need forheterogeneous system support and low cost of ownership, and the last oneaddresses the need for high performance.

The data management system engine supports ease of assembly, re-use,compile time validation, and high performance execution. Surprisingly,most architectural choices actually produced a positive feedback ofre-use/ease-of-use/high performance (composite ports, hierarchicalcomposition of components exists only at compile time, strong typesystem, etc.).

As a result, the data management system simultaneously solves theproblem of development scalability and that of execution scalability fordataflow applications.

Data management system 10 provides an environment where a componentcalled a map can easily be composed from other components and allcomponents run in parallel. Map linking is flexible such that entirehierarchical composite ports can be linked with a single action, or eachindividual scalar port can be individually linked, or any combination inbetween. Flexibility in map linking provides for multiple dimensions ofparallelism to exploit. It also promotes reuse via encapsulation ofsub-schema transformations.

Maps have the flexibility to synthesize internally after properties arespecified and all input port types are synthesized via links to othermap's ports. This synthesis capability gives a map the luxury ofdelaying the decision of how best to exploit any dimension ofparallelism until after it's been filly informed of the types of data itwill process. The end result are maps that can parallelize themselvesbased on the data types being processed, without the intervention orknowledge of the user of the map.

Maps can also behave like templates to take advantage of macrodimensions of reuse and parallelism. For example, this allows forsub-maps to be replicated for processing very large partitioned datasetsin parallel. The end result is maps that exploit multiple dimensions ofparallelism simultaneously. Horizontal (hashed key, range key, etc)partition parallelism, vertical (column or element) partitionparallelism, and pipeline parallelism.

Data management system 10 is a hyper-parallel computing architecturethat embraces component reuse, extensibility, and strongly typed designtime composition. The end result is scalable process development andscalable process execution.

II. Detailed Description

A. Design and Compilation

The data management system offers tools for creation and re-use ofcomponents as well for execution of dataflow applications. FIGS. 2A and2B summarize the complete lifecycle.

The map component source creation and lifecycle is illustrated in detailin FIGS. 3 and 4. In creating map component source (“MCS”) 201 thedeveloper creates the configurable specification for a particular mapfamily according to the requirements.

Because the MCS 201 is an XML document, the developer can write it usinga simple text editor. However, MCS creation and editing is also amenableto the use of a graphical editor that visually performs the steps.

While FIG. 3 illustrates the process of source creation, FIG. 4illustrates the structure of an MCS 201 document. The documentationsection of FIG. 4 is for the developer to document bookkeepinginformation about the component. Items such as author, description ofthe component, date created, etc. go here.

The properties section of FIG. 4 defines the configurable propertiesthat the MCS 201 will expose. There are three types of properties:interface properties, implementation properties, and runtime properties.Properties can be any of the usual scalar types (string, int, float,etc.). The interface properties are basically the properties that willbe delegated to the interface customizer for the map component. Theseproperties will affect the structure of the map component's interface(see below).

The implementation properties are basically the properties that will bedelegated to the implementation customizer for the map component. Theseproperties will affect which internal components or port-to-port linkswill be dynamically added to the generated map. Implementationproperties can also be delegated to internal components, the componentsof the implementation.

The runtime properties are delegated to internal map component's runtimeproperties or to internal map process properties. These properties areused in the procedural code embedded in the map process for runtimedecisions.

When writing the source for a map component, the developer needs tospecify the structure of the ports for the particular dataflow mapfamily that the component represents. The ports can be scalar orcomposite.

Sometimes, the full interface for the map component cannot be knownstatically, at source creation time (for instance, a map component thatreads SQL tables cannot decide the full structure of its output portonly after it knows the particular table it is reading). In this case,the developer specifies all that is known about the interface at designtime and leaves the rest of the specification to procedural codeembedded in an interface customizer. An interface customizer is a hostlanguage component (i.e. Java bean) that implements the system provided“InterfaceCustomizer” java interface. The procedural logic in thecomponent is completely arbitrary and decided by the developer (in thetable reader example, the interface customizer will contain logic forinspecting the table metadata and building the output port recordelement types accordingly). The resulting logic can be configurablesince it is encapsulated in a host language component. The developerconfigures the interface customizer's properties using the declarativelanguage. These properties can be configured by being set to particularvalues, or by delegating from interface properties of the map component.

If there is an interface customizer, the developer also sets some of thecustomizer properties or delegates map component interface properties toparticular customizer properties. The implementation section is wherethe developer specifies which internal components the map component has,how their ports are linked, and whether the implementation has acustomizer.

There are two flavors of components that the developer can use asinternal components: map processes and map components. The map processis a scalar map: it contains an executor interface (i.e. executor ports)and an atomic, natively executable, implementation. The map process is ahost language component (i.e. a Java Bean) that implements the systemprovided class interface MapProcess. Therefore the map processimplementation is not made of internal components and links but ofprocedural logic expressed in the host language. It is important to notethat the procedural logic inside a map process does not need to containparallel logic whatsoever. The parallelism comes when all map processesare automatically executed in parallel by executor 14. All proceduraltransformation work done in map components ultimately resolve to workdone in a map process (for instance, the work of uppercasing a dataflowqueue of strings).

Map components will come from libraries provided with the engine, fromthird parties, and from libraries developed by the user. Such mapcomponents would reside in the Library 16 of FIG. 1.

When writing the implementation there may be cases when the developercannot make all decisions regarding internal components and linksstatically. In this case, the developer puts in the source as much asshe knows and then delegates the dynamic aspect to an implementationcustomizer. An implementation customizer is a host language component(i.e. java bean) class that implements the system providedImplementationCustomizer java interface. Similar to the interfacecustomizer component, the procedural logic is completely arbitrary anddecided by the developer. The resulting logic can be configurable sinceit is encapsulated in a host language component. The developerconfigures the implementation customizer's properties using thedeclarative language. These properties can be configured by being set toparticular values, or by delegating from interface or implementationproperties of the map component.

FIG. 4 illustrates the general structure of a given map component sourcefile 201. Note that several combinations are allowed and not all boxesin the structure are required. For instance, a map component source canbe built with other map components referenced and linked internally withno customizers or map processes, etc. The system providedmapcomponentsource.xsd XML schema can be consulted to learn more aboutthe valid combinations.

The next phase is the map component assembly (203 in FIG. 2A) tovalidate the structure of a map component source 201, protect itscontents against unauthorized changes, and to protect the intellectualproperty included in the source. This is accomplished by using the mapcomponent assembler 203 (FIG. 5), a tool that validates and encryptsinternal information of a given map component source document file.

The assembly process is illustrated in more detail in FIG. 5. As can beseen, the assembly tool 203 takes four inputs: a map component sourcelocation, a component path, a source path, and a target directory. Thelocation of the map component source indicates where the particularsource to be assembled is located. The assembler uses this to find thefile and read it.

The component path indicates the location of the re-usable componentrepositories (in Java this is a class path). The assembler 203 uses thisto dynamically load and verify that internal components exist and are upto date. If an internal map component file is not up to date, then theassembler re-assembles it.

The source path is a host language expression to indicate the locationof source repositories corresponding to internal map components. If asource is found then it is used for potential re-assembly of out of datemap components.

The target directory is used as the root of the resulting map componentfile location. Map components use a hierarchical name space compatiblewith the Java language package notation for organization and loading ofmap component files.

If the input is valid, then the assembly process generates the MC file205 which contains the information given in the source in a tamperproof, encrypted, way. FIG. 6 shows the structure of the resulting XMLfile.

All of the design tools used for steps after map component assembly(FIG. 5) work with host language objects Therefore, before furthermanipulation, the map component must be loaded using the map componentloader 207. FIG. 7 illustrates this process. The map component loadertakes two arguments. The map component fully qualified name and thecomponent path.

The map component source includes directives for naming the package ofthe component and the name of the component. The filly qualified name isbuilt from the package and the name using the same syntax as Java fillyqualified class names. The component path has the same meaning as theassembler's component path.

While the input and output of the two previous tools were files, the mapcomponent loader 207 input is a file but its output is an object: themap component object 209. Once loaded, the map component object 209 canbe interrogated regarding its documentation and properties, but not itsspecification.

The objective of the map interface synthesis step 213 of FIG. 8 (seealso FIG. 2A) is to resolve a fully configurable map component objectinto a map interface object 215. A map interface object is a partial mapwhose ports have been resolved but whose implementation is still left toresolve.

The map interface synthesizer 213 takes two inputs: a map componentobject and an interface configuration. An interface configuration is alist of interface-property-name/interface-property-value pairs. The tooluses the configuration to bind the interface properties of the given mapcomponent object 209 and then generates the port list calling theinternal interface customizer if one is defined. It should be understoodthat the map interface synthesizer 213 is an example of “dynamic logic”employed in the present invention. That is, map interface synthesizer213 changes external port structure during compile and maybe be thoughtof as a way to customize the interface dynamically during compile.

If everything goes well, client code using the map interface synthesizer213 will then receive back a reference to a map interface object 215implementing the system provided MapInterface interface. Once clientcode has a reference, it can then interrogate it with respect to itsdocumentation, interface configuration, implementation properties,runtime properties, and ports. It is still not possible to ask for themap's implementation. FIG. 9 illustrates the structure of a mapinterface object.

The objective of the map synthesis step (217 in FIG. 2A) is to finallygenerate the particular map resulting from a map component and interfaceand implementation configurations. The tool to use is the Mapsynthesizer 217. FIG. 10 illustrates this step in more detail.

The map synthesizer 217 is a host language component that takes as inputa map interface object, explained above, and an implementationconfiguration. If everything goes well, the tool will produce as outputa Map object 219.

A map object 219 can finally be interrogated regarding itsdocumentation, interface configuration, implementation configuration,runtime properties, ports, and implementation. Note that theimplementation will be displayed only if the map component sourcedeveloper indicated that the map component implementation can bedisplayed. If the map component and all internal map components areopen, then the full hierarchical implementation will be visible. FIG. 11illustrates the structure of a map object 219.

A map 219 that has no input and outputs is a dataflow application. Ifthe map object 219 represents a dataflow application then the mapsynthesizer also produces the execution plan, an internal (i.e. private)data structure. The execution plan is a flat (i.e. non-hierarchical)data structure containing references only to the map processes includedin the map as well as their links among executor ports of the mapprocesses.

The execution plan synthesis process discards all structural informationthat is important for human re-use and understanding of maps but is notneeded for execution. It also discards all customization logic and otherstructures only concerned with compile time validation. Execution plangeneration can be seen as an optimization technique that helps executionperformance by reducing footprint, removing indirection (i.e. MC ports)and reducing complication of design. FIG. 12 shows the structure of anexecution plan. The executor plan is basically text that can bepersisted or delivered for execution.

If a map 219 is not a dataflow application, then the map synthesizer canstill be used as a development process aid since the developer may wantto know the final structure of maps generated from a map component fortesting or documentation purposes.

The map synthesizer tool 217 is a key component of the compiler 12. Fullsyntactic and semantic validation of the hierarchical map structure isdone here as well as type synthesis, plan generation, and otheroptimizations. The resulting map object can then be queried about itsinternal structure (i.e. ports, internal components, and their links) asshown in FIG. 11.

As noted above, during creation of a map component a user may employ“dynamic logic” to construct an implementation or interface customizer.An interface customizer changes external port structure while animplementation customizer changes internal graph structure. Besidessemantic validation and port type propagation (i.e., type synthesis), akey goal of the map synthesizer 217 is to customize the implementationand is made possible by three architectural features. First, there mustbe a distinction between graph creation and graph execution: “compiletime” vs “runtime” (FIG. 2A vs FIG. 2B). Second, there must be compositecomponents: components whose implementation is a graph of subcomponents.Third, components can embed logic to dynamically alter internalimplementation. This logic when executed has access to synthesized typeof input ports. The simultaneous use of these architectural features arenot known in any current dataflow systems and their occurrence enablethe important functionality of map synthesizer 217. The map synthesizer217 can invoke an implementation customizer to change a compositecomponent's implementation graph at compile time.

Importantly, the implementation customizer collaborates with the mapsynthesizer 217. The map synthesizer 217 provides the followinginformation to the implementation customizer:

-   -   The static part of the implementation graph;    -   The values of design-time (i.e. compile-time) properties; and    -   The synthesized types of external ports.        Based on the information provided, the implementation customizer        may:    -   Add map components and map processes to the implementation graph    -   Add links to the implementation graph.    -   Configure the properties of map components and map processes in        the implementation graph.

In general, implementation customizer process allows a whole family ofrelated dataflow graphs to be packaged as a single reusable componentwith a simple interface. The implementation customizer builds anappropriate implementation graph, based on the contextual informationprovided by the map synthesizer 217.

The implementation customizer can be used to achieve a variety ofpurposes.

-   -   1. To control the degree of parallelization. For example, FIGS.        17 and 19 respectively illustrate “split” and “join” operations        where the number of CPU's (or threads) is a property.    -   2. To include or exclude the implementation of optional features        such as the Gzip decompress function inclusion (or exclusion) in        the flat file reader component operation illustrated in FIG. 16.    -   3. To route different fields to different subcomponents,        depending on the field names given in a property. See the        different linking of join keys and join data in the “join”        operation depicted in FIG. 19 based on the key names property.    -   4. To select different implementations for different data types.        One example is a generic data type converter component, with        different implementations for DoubleToInt, FloatToString,        StringToDate, etc. Another example is components for arithmetic        operations: a multiplication component could have different        implementations for different types of number (MultiplyLong,        MultiplyDouble, MultiplyBigInteger . . . )    -   5. To create dataflow templates that use components as property        values. A simple example would be a generic data cleaning        component that lets through the rows that pass a quality check        but writes all other rows to a reject file. This generic filter        could take a quality checking component as a property. Quality        check components wouldn't have to know about filtering or the        reject file. They could simply read in the rows and write out a        boolean: pass or fail, for each row.

The hypermap component of FIG. 23 is easy to use because it takes easyto understand properties and from there the map synthesizer 217 buildsits internals. But the internals shown in FIGS. 23 and 25 may bedifficult to understand because it combines two uses of the mapsynthesizer 217 (Nos. 1 and 5 above). The Hypermap function operates asa dataflow template that captures the general pattern of using dynamiclogic (#5 above) to control the degree of parallelization (#1 above).Both the degree of parallelization and the component to be parallelizedare determined dynamically.

When a component reaches the map synthesis stage 217 of the lifecycle ofFIG. 2A, the map synthesizer checks if the component has animplementation customizer. If it does, then the implementationcustomizer is run. Once that is done, the subcomponents in theimplementation, and the way they are linked, is known. The mapsynthesizer then moves the subcomponents through some lifecycle stages:loading, map interface synthesis, and . . . recursive map synthesis.This recursive process builds the map object, a hierarchical structureof components nested inside other components.

Before recursive map synthesis on a subcomponent, the map synthesizerdetermines the types of the input ports of that subcomponent by lookingat the sources linked to those input ports. This “type synthesis” stepis necessary so that input port types will be available when thesubcomponent's implementation customizer runs.

In summary, the map synthesis stage 217 consists of:

-   -   1) Running the implementation customizer, if any.    -   2) Loading the subcomponents.    -   3) Map interface synthesis of the subcomponents.    -   4) Map synthesis of the subcomponents, interleaved with semantic        validation and type synthesis of the port-to-port links.

B. Preparation and Execution

To finish compile as shown in FIG. 2A, the map object 219 obtained bysynthesizing a map using the process above encodes information usefulfor display purposes. If the map object 219 contains no ports then it isa dataflow application and therefore also contains an execution plan. Inthis case, the map object 219 can be executed.

As shown in FIG. 13, a prepared map 222 is generated from the mappreparer tool 221, which takes as input a fully synthesized map object219. A prepared map 222 is the executable portion of the dataflow graphwith all composite component structures stripped away, leaving only themap process elements and their subsequent dataflow links for parallelexecution. The map preparer 221 uses the map object's plan informationto load map processes and sets up internal data structures. A preparedmap can be queried regarding its runtime properties.

The executor 14 takes a prepared map along with runtime properties, 223in FIG. 14, and generates a “task” that can be executed only once. Aconfigured prepared map 223 can be executed multiple times by generatinga new task for each execution. A task is a collection of threads with athread allocated to each map process instance thus allowing all mapprocesses to execute in parallel. The executor thus takes a PreparedMapobject 223 along with a runtime configuration (i.e. a list ofruntime-property-name/runtime-property-value pairs), validates it, andthen executes it if correct.

Note that this last step is similar to the way relational databasequeries are executed: first they are prepared (i.e. compiled), thenparameters are set, then the query is sent to the executor forexecution. If a sub-sequent execution is needed, there is no need to paythe price for recompilation: just reset parameters, and resend the sameprepared query. Thus, this is another performance optimization. FIG. 14illustrates this step. Note that the executor 14 has also an internalstructure and a lifecycle.

Because a task is a collection of threads and map process instances witha thread allocated to each map process, it is also a single point offailure. That is, if any thread within the task fails, the entirecollection of threads will be terminated abnormally with exception/stacktrace information pertaining to each thread/map process.

When a task is run, each map process instance within the task isexecuted in parallel in a collection of threads. During execution theuser defined logic within the map processes read data tokens from inputports and/or push data tokens onto output ports. A map process typicallyreads data from input ports until an end-of-data operation isencountered for all input ports. Likewise a map process typicallyperforms an end-of-data operation on all output ports as the lastoperation following all data tokens pushed. After instantiating the mapprocesses and setting any runtime properties, the executor theninitializes and links the publicly declared map process ports tocomplete the executable task.

Input ports block/wait when data tokens are not yet available from thecorresponding output port comprising the dataflow link. Output portsblock/wait when data token output production exceeds system definedqueue limits to allow the corresponding input ports comprising thedataflow links to catch up. This may be visualized in the processnetwork of FIG. 30. In FIG. 30, a queue 706 connects two processes, 702and 710, where 702 writes tokens to queue 706 and 710 reads tokens fromqueue 706. That is, FIG. 30 shows a first-in, first-out communicationschannel where data tokens send along the queue 706 are stored until thedestination process 710 consumes the data tokens.

In general, the system makes use of the port type synthesis duringcompile to optimize execution. The type synthesis phase in map componentsynthesis (217 in FIG. 2A) predetermined the exact type of each dataflowlink. This allows the executor 14 to choose specific, type optimized,port implementations. The executor 14 has specific port implementationsfor all primitive, standard database data types. These ports areindividually optimized to move specific types of data.

Due to type synthesis, generic ports at design time become specificports before execution. The executor 14 queries the synthesized type ofeach link within the prepared map 222 (FIG. 2B and FIG. 14) andinitializes declared input/output ports of each map process withappropriately typed input/output port pair implementations.

Referring to the generic process network of FIG. 30, the synchronizationand transportation overhead of passing each data token individually fromoutput port 704 to input port 708 would usually be excessive. Thespecific port type implementations utilized by the executor 14 mitigatethis overhead by passing tokens to a local unsynchronized token buffer(a “batch”) and thereafter passing these batches to the synchronizedcommunication queue instead. Regulating the size of the token batchregulates the length of time a map process may execute free ofsynchronization thus minimizing thread contention.

The end result is a map process in accordance with the present inventionmay push many batched data tokens on an output port 704 before thecorresponding input port 708 comprising the link 706 will wake up. Theinput port 708 will subsequently produce tokens without blocking for asmany tokens as there are in a token batch. This results in map processesthat wait for a substantial amount of data to build up as input beforethey wake up to execute and thus they also run uninterrupted for longerperiods of time, making optimal use of multithreading systems.

Null value is typically considered two-state: either unknown or valid.In the system 10 of the present invention, all port implementationssupport the concept of multi-state null value tokens. That is, theinput/output ports support three state logical operations with nullvalues. Indeed the system 10 has extended this concept to multi-state,user defined, null values including a system defined error null.

Error null allows a component to capture transformation exception statewhen local context is insufficient to adequately report the problem, andpush it through a dataflow link as a type of null value. A downstreammap process in the dataflow graph can then deal with and report theexception when context is fully known.

All states of null value default to a minimum state null if transportedto a domain that supports only minimal state null value logic like arelational database. All ports provide a default data value if nullvalue testing is completely ignored or transported to a domain that doesnot support null value.

As seen during the design and compile phase (see also the examplesbelow, FIG. 20), a composite port is a collection of ports and is theprimary port type for passing composite or record data. Eachcolumn/field in the record is transported via its own sub port. Subports can be advanced/iterated independently from the other sub portswithin a composite port. Conversely, advancing/iterating a compositeport will advance/iterate all sub ports in tandem.

Composite ports that are associated with composite components aretrimmed along with the composite components during generation of theprepared map (See e.g. FIG. 24). Only the sub ports that ultimately linkmap processes remain, allowing for maximum parallel throughput of sublinks. Composite ports that are associated with map processes are nottrimmed but are populated with sub ports of specific type aspredetermined by the type synthesis phase in map component compilation.

Map process instances within a task execute via a set of methods invokedby the map process thread. A map process has 3 distinct user definedexecution stages and subsequent method calls. A map process start( )method is called during startup to allow for user definedinitialization. A run( ) method is invoked to execute a map process inparallel, analyzing input port tokens and/or producing output porttokens. A map process end( ) method is called after the completion ofall map processes in the task to allow for user defined shut down logic.

start( ) method

The start( ) method of each map process instance is called to allow userdefined startup logic to run before dataflow execution. All map processstart( ) method invocations will complete before any map process run( )methods are invoked.

run( ) method

This method is where the user embeds logic to process data tokens frominput ports and/or push data tokens onto output ports. The run( ) methodis called by each map process thread for each map process instance. Therun( ) method passes a task context object as a parameter to allow themap process to interact with the task run-time state.

An interesting functionality of the system 10 of the present inventionis the capability to execute subtasks within a map process. One taskinteraction feature provided by the task context object is the abilityto invoke the compiler 12/executor 14 within a map process to createadditional tasks as subtasks. Once a task has been added as a subtask itbecomes part of the parent task's unit of failure such that if a subtaskfails then the entire parent task is shut down and vice versa.

Invoking another task as a sub task within a map process is a way fordataflow applications to dynamically generate sub graphs depending ofthe content of data. An example of this is a generic sort componentwhich might dynamically invoke multiple, independent merge sort subgraphs with the number of merge sorts dependent on the amount of databeing sorted.

end( ) method

The end( ) method of each map process instance is called only after allmap process run( ) method invocations have completed. This method iswhere the user embeds logic to clean up after parallel dataflowexecution is complete.

As can be appreciated from the generic process network of FIG. 30 andthe above description, some method of deadlock detection and correctionis desirable. The dispatching of map process threads is completelydriven by the availability of data in the case of input ports 708, andthe availability of queue resources in the case of output ports 704. Acertain class of dataflow patterns that “split” and then “merge” a graphcan deadlock without deadlock management for detection and correction.

A port 708 will block when the next token batch is unavailable, or thequeue limit has been reached in the case of an output port 704. Before aport blocks a map process thread, it first performs deadlockdetection/correction analysis. This begins by first adding the soon tobe blocked thread to a wait graph by recording state in the threadindicating the other thread this thread is about to wait on. State isalso recorded in the thread as to whether this map process is waiting asa producer in an output port or a consumer in an input port (702 and 710respectively in FIG. 30). This is the beginning/continuation of a waitgraph that is then analyzed.

The wait graph is then traversed starting with the node representing thethread the soon to be blocked thread is about to wait on. If that threadis blocked then the graph traversal continues with the next noderepresenting the thread it waits on and so on. If the wait graphtraversal encounters a thread that is not blocked then a deadlock doesnot exist and the current thread is allowed to block.

If a circular wait graph is detected then additional analysis isperformed to correct the deadlock. A thread that waits as a producer(writer 702 in FIG. 30) in an output port is chosen from the circularwait graph and notified to exceed its queue limit. This chosen thread isallowed to exceed a queue limit on an output port (704 in FIG. 30) inorder to continue processing and break the deadlock.

This process detects and corrects deadlocks as they occur by temporarilyallowing queues to grow. Production rates of tokens from output ports iscompletely arbitrary due to the fact that it is driven by user definedlogic. This process is similar to the process described by T. Parks inImplementation of Process Networks in Java, supra. However, this couldpotentially allow queues to grow beyond system memory resources. Beforethis occurs the system 10 performs additional analysis.

One solution to deadlock queue growth is allocating disk storageresources and allowing the queue to grow temporarily in disk memory.Before this happens, however, the other, non-expanding queues involvedin the wait graph are analyzed for possible token batch reduction. Thealgorithm for token batch reduction can be chosen to optimizeconvergence of the deadlock correction, i.e. the algorithm can be chosento minimally or maximally reduce the token batch size depending on thenature of the problem.

Token batching is essential to dataflow queue performance; however, itis counterproductive when queues expand beyond memory resources and mustexpand to disk. By reducing token batches in the non-expanding queuesinvolved in the wait graph while at the same time allowing the expandingqueue to continue results in a balanced optimization for both low andhigh memory environments.

III. Examples

The following examples show the flexibility and power of the datamanagement system of the present invention. The diagrams indicate porttype synthesis/propagation and the effect of properties on internalsub-map generation in dynamic composite maps. Thin solid arrows denotelinks between scalar ports. Thick solid arrows, indicating the groupingof multiple sub-port links, denote links between composite ports. Openblock arrows denote design-time/run-time properties that can be set bythe map user to affect behavior. A dashed open block arrow is animplicit property that the map itself can query at design time withoutexplicit user intervention. A map denoted by a dashed outline indicatesa composite map that can be drilled into to further expose sub-mapdataflow graphs.

A. Flat File Transfer

The example of FIGS. 15-17 illustrates how applications can be developedby simply dragging/dropping/linking preexisting map components. Theapplication simply reads the fields from one flat file and writes thecontents to another flat file, possibly with different line/fielddelimiters and/or encoded into a different Unicode character set.

FIG. 15 illustrates an application employing two maps. The output portof flat file reader is linked to the input port of flat file writer. Theappropriate properties are set by the user at design time to indicatefield/line delimiters, Unicode character set for encoding/decoding, filenames, and input flat file schema (since flat files, unlike databases,do not have embedded schema definition).

In more detail, FIG. 15 shows a high-level map of an application whichreads data from a single flat file and writes that data to another flatfile in a different format (i.e. FIG. 15 does not depict a simple binarycopy utility). Flat file reader 601 uses design-time parameter settingsfor file name 605, character set identification 607 (for example, aUnicode character set specifier), line delimiter 608, field delimiter609, and a specification for the flat file schema 610. The inclusion ofschema 610 is advantageous since a flat file may not carry within itselfmetadata identifying the significance of the data, as would a database.The output of flat file reader 601 appears on composite port 603 and isaccepted as input by flat file writer 602 on its composite input port604. Flat file writer 602 uses design-time parameter settings for filename 611, field delimiter 612, line delimiter 613, and character setidentifier 614. In general, these parameter settings will have differentvalues for reader 601 and writer 602. It is noted that although the dataoutput types of composite port 603 of file reader 601 cannot be derivedfrom the map at this level, it is clear that the composite input port604 of flat file writer 602 must be synthesized to match the data typesappearing on port 603.

The dataflow design tools of the data management system verify correctcomposition by analyzing the dataflow links for each linkedport/sub-port. In the example of FIG. 15 the only link is a genericcomposite link so no type constraints exist and the input port type offlat file writer is synthesized to match the schema of the output portof flat file reader. This application is simple to create and usebecause the composite maps Flat File Reader and Flat File Writer hideimplementation complexity within each sub-map.

FIG. 16 shows, in more detail, the map of flat file reader 601 of FIG.15. As shown in FIG. 16, flat file reader 601 comprises raw file reader615, which accepts parameter setting 605 specifying the file name. Filereader 615 generates a stream of byte buffers which appears at port 620and is accepted as input to gzip decompression function 616. Gzipdecompression is optional, since it will not be needed unless the filehas been compressed. Consequently, the selection to use gzipdecompression function 616 may, in some embodiments, be made at designtime by employing decompression selection parameter 606.

The output from optional decompression function 616 is a stream of bytebuffers which appears at data port 622. This byte stream is accepted atinput port 623 of text decoder 617. The parameter setting identifyingthe character set of the input file is determined by design-timeparameter setting 607, which may be, for example, a Unicode characterset identifier. Text decoder 617 converts the byte values of its inputbyte stream into a character stream, which appears at output port 624.This character stream is accepted at port 625 as input to text splitter618. Text splitter 618 employs design-time parameters line delimiter608, field delimiter 609, and flat file schema 610. These settings allowthe character stream input at port 625 to be split into lines and fieldsto separate the characters into meaningful entities identified by theschema parameter 610. Text splitter 618 is a composite map, whoseinternals are not revealed at this level of the design. The output fromtext splitter 618 appears on its composite output port 619 and istransferred to composite output port 603 of flat file reader 601.

In general, the data type of output port 620 of file reader 615 is astream of byte buffers. Thus, input port 621 of gzip decompressor 616 isconstrained to be a byte buffer compatible data type according todataflow linking rules. The output of gzip decompressor 616 is a streamof byte buffers as well, thus the input port 623 of text decoder 617 isalso constrained to be a byte buffer compatible data type. The count ofsub-ports comprising composite output port 619 and the data types whichare handled by those sub-ports cannot be determined at this level of themap hierarchy, but it is clear that output port 603 must match theconstraints which will be imposed by port 619.

Viewed another way, FIG. 16 details the internal dataflow graph of theflat file reader map of FIG. 15. The “file name” property is delegatedto sub-map file reader, which reads the raw bytes from the source flatfile. File reader's output is via a ByteBuffer output port so it canonly be linked with ByteBuffer input ports or a compatible generic inputport capable of synthesizing into a ByteBuffer port, according todataflow linking rules.

The “Gzip” property of FIG. 16 is utilized by the Flat File Reader mapat design time to dynamically include/exclude the Gzip Decompresssub-map, depending on whether the user wants to read a Gzip compressedsource flat file. In FIG. 15 of this example, this property was notspecified so the Flat File Reader map would not include this sub-map andsubsequently link sub-map File Reader's output directly to the inputport of sub-map Text Decode. The “character set name” property isdelegated to the Text Decode sub-map. It takes ByteBuffers via its inputport and produces decoded Unicode strings via its string output port.

The “line delimiter,” “field delimiter,” and “flat file schema”properties are delegated to the text split sub-map. It takes strings viaits input port and produces the flat file's fields via a compositeoutput port. Note that sub-map text split is itself a composite map,indicating further graph complexity.

FIG. 17 shows the next level of the design composition (i.e., theinternals of text splitter 618). These internals are synthesized usingthe specifications of the flat file schema parameter 610 and the numberof CPUs available at runtime provided by the executing system as CPUcount 640. By deferring the synthesis of the text splitter until theruntime environment is known, the optimal dataflow sub-graph for textsplitter 618 may be synthesized. In the example depicted in FIG. 17, theavailable CPU count is four. The character stream input at port 625passes to input port 631 of text parser 630 and also to input ports 642of the four extractors 640. Text parser 630 uses line delimiter 608 andfield delimiter 609 parameters to analyze the input character streamand, thus, generates streams of offsets and lengths indicating theposition of fields within the strings. This offset and length dataappear on composite output port 632 of text parser 630 and are passedindividually to ports 641 of the four extractors 640. By using theoffsets and lengths, each processor selects its own data from thecharacter stream, thus dividing the processing effort over the CPUs.Data streams from each extractor 640 appear on composite output ports643. The specification of ports 643 can now be returned to the nexthigher level of the hierarchical map design to enable the synthesis ofports which depended on port 643.

Data streams available at composite port 643 may be heterogeneous afterinterpretation of the input character stream. For instance, characterstreams, such as names or addresses, would remain as character streams,but numerical data may be converted to native data types such asintegers or floating-point representations, and dates or times may beconverted to encoded forms. The design time synthesis process thatoccurs during map linking allows each map to further synthesize internaldataflow graphs once all the map's input ports have been synthesized.This process is recursive until all dataflow graphs in all maps havebeen synthesized.

The “flat file schema” property in FIG. 17 is utilized by the text splitmap to synthesize its internal dataflow graph, ultimately composed ofthe sub-maps necessary to transform text into data of specific types,and subsequently its output port type. The text split map contains logicthat analyzes the “flat file schema” property along with systeminformation about the number of available processors to synthesize theoptimal dataflow sub-graph.

The text parse sub-map of FIG. 17 parses the stream of input strings andproduces streams of offsets indicating the position of fields within thestrings, via a composite output port. The individual element ports ofthe offsets composite output port are linked to multiple slave mapswhich extract/convert text into data of specific types.

Each of the slave maps converts a subset of text fields from the streamof input strings. Collectively they provide all output element ports fortext split's composite output port and subsequently the composite schematype of the output port.

The design time synthesis process that occurs during map linking allowseach map to further synthesize internal dataflow graphs once all themap's input ports have been synthesized. This process is recursive untilall dataflow graphs in all maps have synthesized.

B. Join

FIGS. 18 and 19 illustrate an application that joins the data from twoflat files and outputs the resulting dataflow stream into a database.FIG. 18 illustrates an application employing 4 maps. The output ports offlat file reader maps 351,353 are both linked, one left and one right,to the input ports of the join map 355. The join map's output port 361is linked to the input port of a SQL writer map 357. The appropriateproperties are set by the user at design time to sufficiently specifyall maps.

The “right file schema” and “left file schema” properties result in thesynthesis of the flat file reader maps 351, 353 and their subsequentcomposite output ports as described in the previous example. The typesynthesis process propagates to the join map's composite input ports365, 367. The join map 355 is then allowed to synthesize its internaldataflow graph and subsequently synthesize the combined or “joined”schema type of its composite output port 361.

The type synthesis process then propagates to the SQL writer map 357.The SQL writer map 357, when called upon to synthesis its internaldataflow graph, can evaluate the query with the backend database toverify and set the schema of its composite input port. This enables typeconstraint problems to be discovered during the synthesis process atdesign time rather than execution time.

FIG. 19 details the internal dataflow graph of the join map 355. The“key names” property is utilized by the join map to link the appropriatesub-ports of the left and right composite input ports to the appropriateinternal sub-maps.

The key sub-ports of the left composite input port 365 are linked to akey group map 369 to compute the sizes of left side duplicate keygroups. The key sub-ports of the right composite input port 367 arelinked to another key group map 371 to compute the sizes of right sideduplicate key groups. The key sub-ports of both the left and rightcomposite input ports are also linked, one left and one right, to inputports of the key compare 373 and key transfer 375 sub-maps.

The data sub-ports of both the left and right composite input ports 365,367 are linked to the input ports of multiple slave maps 377 thattransfer the data fields. The number of slave maps is determined duringthe synthesis process using system information about the number ofavailable processors (or threads depending on hardware environment).

The “key count” output ports of the key group sub-maps 369,371 are bothlinked to input ports of both the key compare map 373 and the keytransfer map 375. They are also both linked to input ports of all theleft and right data transfer slave maps. The key compare map 373 usesthe key counts to only compare the first key of any duplicate key group.The other sub-maps 377, 375 use the key counts to transfer key and datafields.

The “result” output port of the key compare map 373 is linked to inputports on the key transfer map 375 and all of the left and right datatransfer slave maps 377. The “result” dataflow, coupled with the leftand right “key count” dataflows, is all the information needed totransfer the correct patterns of key and data values to the compositeoutput port 361 of the join map 355.

The collection of output ports from the key transfer map and the leftand right transfer slave maps make up the entire composite output portof the join map 355 and subsequently its composite schema type.

It should be noted that the Join algorithm employed by this exampleassumes the input streams are sorted via the same keys used to jointhem. Additional logic could be employed by the join map 355 to checkfor this constraint by first checking the synthesized input port sortschemas to verify they are sorted appropriately. The join map 355 couldalso employ dynamic logic to synthesize one of several join algorithmsdepending on the synthesized input schema type.

C. Hierarchical Ports

FIG. 20 illustrates the full flexibility of composite ports. Compositeports are hierarchical collections of ports and as such can be used totransfer any composite pattern of data types.

FIG. 20 illustrates an application employing 4 maps. The source map 401produces data via a hierarchical composite output port 411. Some of thesub-ports, themselves composite ports, are linked to the input ports oftwo different user transformation maps 403, 405 with the remainingsub-ports linked to the composite input port of the target map 407. Theoutput ports of the two user transformation maps 403, 405 are alsolinked to the input port 413 of the target map 407.

The transformation maps 403, 405 can be developed independently based onsub-schemas. As sub-schemas are combined to create composite schemas thecomponents to process the sub-schemas can be reused to rapidly createcomponents to process the composite schemas. This flexible linkingprocess provides for process development scalability and since all mapsrun in parallel it also provides process execution scalability.

D. Binary Half Adder

FIG. 21 is a process flow diagram for the design and code synthesis of abinary half-adder. Such an example is provided to allow a more detaileddescription of the recursive process for code synthesis based on the useof hierarchical maps. The design of the process flow diagram depicted inthe upper third of FIG. 21 shows the highest-level map of binaryhalf-adder 501. Map 501 accepts data on two data input ports 502 and503, and the output of half-adder 501 is available on data ports 506 and507. The functionality of the half-adder is provided by logical AND 504and logical XOR (exclusive-or) 505. AND 504 is considered a logicalprimitive and can be compiled directly, but XOR 505 is not a primitiveand must be specified at a lower level of the design hierarchy. Thecompiler 12, thus, is directed to resolve the XOR 505 by descending alevel to obtain the map for XOR, which may be already present in thecomponent library 16, or may be designed by the developer. The middlethird of FIG. 21 illustrates an exemplary embodiment of XOR 505 at alower level of design hierarchy directly below the higher level designhierarchy display of binary half-adder 501. As shown in the middle ofFIG. 21, XOR 505 may be comprised of logical primitives NOTs 508 and509, ANDs 510 and 511, and OR 512.

Having resolved the map for the XOR 505, the compiler 12 may nowsubstitute the XOR 505 within binary half-adder 501 with its lower-levelmap while retaining AND 504. Thus, the compiler 12 may proceed tocompile the total half-adder using only logical primitives. The designermay thus work at a relatively high level of representation as shown inthe upper part of FIG. 21. In addition, the recursion of the codesynthesis process allows the lower-level details of the middle andbottom maps of FIG. 21 to be implemented without the need for thedesigner to be distracted by these lower-level details. For functionsnot found in the library 16, the designer is prompted by the compiler 12to specify these as necessary, but in general the efficiency ofextensive code re-use is provided by these means, with the designer'sattention directed to only those functions where effort is required. Themap 501 in the upper third of FIG. 21 is easier for the designer toconceptualize and work with then the more complex map 501 in the bottomthird of FIG. 21. The binary half-adder depicted in FIG. 21 is a simpleexample to illustrate the principle and benefits of the system describedherein. As such, the system described herein is not necessarilyrestricted to the design depicted in FIG. 21. In particular, the systemdescribed herein may have a different process flow diagram, such as onewith a more complex design.

E. Partitioned Parallelism

FIGS. 22-26 illustrate how maps may be used as templates. The hyper mapis one such map that is utilized to implement partitioned parallelism.The following examples show how the hyper map can adopt and partitionanother map's interface and implementation.

FIGS. 22-24 illustrate an application employing three maps 601, 603,605. The hyper map 603 serves as a map template and when first draggedinto the design, has no ports. The user configures hyper map'sproperties with the name of a transformation map and it's properties.Upon configuration the hyper map 603 synthesizes composite portsmatching those of the specified transformation map except in onerespect. Hyper map's ports have an additional level of hierarchyrepresenting multiple dimensions or partitions.

The output port of the hyper reader map 601 is then linked to the newlysynthesized input port of the hyper map 603. The output port of thehyper map 603 is then linked to the input port of the hyper writer map605.

FIG. 23 shows how the dataflow synthesis process allows the hyper readermap 601 to synthesize its internal, partitioned dataflow graph. Typesynthesis results in the partitioned schema of the hyper reader map'soutput port 607 to propagate to the input port 609 of the hyper map 603.

Hyper map 603 then synthesizes its internal dataflow graph by linking aseparate instance of the user specified transformation map to eachsub-port in the top hierarchical level of the hyper map's compositeinput port 609. The output port of each transformation map is likewiselinked to the top hierarchical level of the hyper map's composite outputport 611.

Type synthesis results in the partitioned schema of the hyper map'soutput port 611 to propagate to the input port 613 of the hyper writermap 605. The hyper writer map 605 then synthesizes its internal,partitioned dataflow graph. If a type constraint issue is encounteredsuch as incompatible partition schemas then the user is notified andadditional components can be utilized to correct the mismatch. In thiscase it was successful so the partition schema matched from source totarget.

FIG. 24 shows how the dataflow synthesis process eliminates design timecomposite map links. A composite map is a wrapper around an internaldataflow graph consisting of a collection of sub-maps. All compositemaps and their subsequent links are dropped during the synthesis processleaving only scalar maps linked directly to each other. The result is adesign process that treats partitioned data as a single, schema typedstream, yet at execution time produces independent streams that can beprocessed in parallel.

FIG. 25 shows how the hyper map 603, leveraging the flexibility of theframework, can work with any map. Hyper map in this case has transformedinto a hyper join by adopting and partitioning the specified join map'sinterface of two input ports 621 and a single output port 623. Thedimensions of the input ports determine the dimensions of the hyper map603. If they don't match, then hyper map 603 generates a type mismatcherror and the user can utilize additional map components to correct theproblem.

It should be noted that in the case of join, additional schemaconstraints exist beyond matching partition parity. If the dataflowstreams are hash partitioned then the left and right partitioned inputsmust be hashed using the same keys. Adding an additional compositewrapper map around the hyper map 603 could create a more robust,flexible version of a hyper join map. This new version of hyper joincould inspect the input port partition schemas to implement theconstraint. It could alternatively synthesize additional map componentsto repartition one of the input dataflow streams or generate acompletely different join algorithm depending on input synthesis.

FIG. 26 shows again how the synthesis process drops composite map linksto produce a partitioned join where each partition is independentlyjoined in parallel. If additional levels of composite map wrappers hadbeen implemented such as the more robust hyper join discussed in FIG.25, the end result is that only the scalar maps and their subsequentlinks are retained for execution.

Also note that the join map replicated multiple times by the hyper map603 is itself a composite map. Its internal dataflow graph as depictedin an earlier example is also replicated multiple times providingmultiple dimensions of parallelism.

F. Repartition

FIG. 27 illustrates another use of a template map. The hyper partitionmap 631 is another such map that is utilized to transform partitionschema to correct partition schema mismatch.

In this example, a partitioned data source is read by a source map andthen processed by a source transformation map that is dependent on thesource partition schema. The stream is then repartitioned and processedby a target transformation that is dependent on the target partitionschema. The data is then passed to a partitioned target map.

FIG. 27 illustrates an application employing five maps. The hyper readermap 601 is linked to a hyper map 603 specified with a transformation mapthat is dependent on the source partition schema. The hyper writer map605 is linked to another hyper map 603 specified with a transformationmap that is dependent on the target partition schema. If these twodataflow graphs were to be linked directly it would result in apartition schema type mismatch.

The user then configures hyper partition map's properties with the nameof a partition map and it's properties. Upon configuration, the hyperpartition map 631 synthesizes a single composite input port and a singlecomposite output port. The partition schema of the output port isdependent on the specified partition map and its properties.

The output port of the hyper source transformation map is linked to theinput port of the hyper partition map. The output port of the hyperpartition map is then linked to the input port of the hyper targettransformation map.

FIG. 28 illustrates again how the synthesis process works. The partitionschema of the hyper reader 601 map's output port propagates to the inputport of the hyper target transformation map 603. It then synthesizes itsinternal, partitioned dataflow graph and subsequent composite outputschema and so on.

When the type synthesis process reaches the hyper partition map 631, itsynthesizes its internal dataflow graph by linking a separate instanceof the user specified partition map to each sub-port in the tophierarchical level of the hyper partition map's composite input port. Aseparate instance of a generic merge map is likewise connected to eachsub-port in the top hierarchical level of the hyper partition map'scomposite output port. Each instance of the specified partition map islinked to every instance of the merge map such that the each sub-port ina partition map's composite output port is linked to a separate mergemap. The partition schema links are now “type correct.” The hyperpartition map's synthesized output schema matches that of the hyperwriter map 605.

The synthesis process drops composite map links to produce partitioned,parallel dataflow streams. The hyper partition map 631 can be utilizedto partition a non-partitioned stream (partition parity 1 to n),repartition a partitioned stream (partition parity n to m), andunpartition a partitioned stream (partition parity n to 1).

FIG. 29 illustrates how the hyper partition pattern generated in FIG. 28can be modified by the framework to execute in a cluster environment. Inthis case additional maps are inserted at the links between the multiplepartition maps and the multiple merge maps. These additional mapsserialize/deserialize the dataflows and extend the dataflow links overcommunication links to allow the maps to be farmed out over a cluster ofcomputers. In this example five cluster nodes are utilized, one for eachpartition of the source dataflow stream and one for each partition ofthe target data flow stream.

It will be appreciated to those skilled in the art having the benefit ofthis disclosure that this invention is believed to provide a system andmethod for synthesizing executable code from graphical dataflow maps.Further modifications and alternative embodiments of various aspects ofthe invention will be apparent to those skilled in the art in view ofthis description. Accordingly, this description is to be construed asillustrative only and is for the purpose of teaching those skilled inthe art the general manner of carrying out the invention. It is to beunderstood that the forms of the invention shown and described hereinare to be taken as the presently preferred embodiments. Elements andmaterials may be substituted for those illustrated and described herein,parts and processes may be reversed, and certain features of theinvention may be utilized independently, all as would be apparent to oneskilled in the art after having the benefit of this description of theinvention. Changes may be made in the elements described herein withoutdeparting from the data management system and scope of the invention asdescribed in the following claims.

1. A method for developing a dataflow application comprising: developingone or more data transformations using a host language; assemblingseveral data transformations having ports into a map component withlinks between ports using a declarative language for static assemblageand a host language for dynamic assemblage, wherein a map componentperforms a respective data transformation; compiling one or more mapcomponents with syntactic and semantic analysis; and synthesizing thecompiled map components into an executable dataflow applicationincluding removing the design time links between ports.
 2. The method ofclaim 1, wherein the steps of creating an executable dataflowapplication comprises: synthesizing a hierarchical map component;flattening the hierarchical map component; and determining theexecutable dataflow application using the flattened hierarchical mapcomponent in conjunction with runtime properties.
 3. The method of claim1, further comprising encrypting the dataflow graphs prior to the stepof compiling the map component.
 4. The method of claim 1, wherein thehost language for data transformation logic is an object-orientedprogramming language.
 5. The method of claim 1, some of the mapcomponents implementing dynamic assemblage logic implemented in anobject-oriented programming language.
 6. The method of claim 1, some ofthe map components comprising a plurality of other map componentsarranged hierarchically.
 7. The method of claim 1, some of the mapcomponents being static which consistently generate the samehierarchical map.
 8. The method of claim 1, some of the map componentsbeing dynamic to generate different hierarchical maps dependent onproperties and dynamic logic.
 9. The method of claim 8, the dynamic mapcomponents receiving information concerning properties, port types, anddataflow graph implementation and configuring its properties andinternal dataflow graph implementation based on said receivedinformation.
 10. The method of claim 1, one or more of the mapcomponents having interface and implementation properties.
 11. Themethod of claim 1, some of the map components ports configured forsending data and some configured for receiving data.
 12. The method ofclaim 11, some of the ports being typed based on the type of dataconveyed.
 13. The method of claim 11, some of the ports being composite,comprising a plurality of hierarchical ports.
 14. A computer-readablemedium having a dataflow development system comprising: a library ofcomponents, some of the components being scalar and comprising a datatransformation, some of the components being composite, and comprising ahierarchy of other components representing data transformations; acompiler to develop and assemble components into an executable dataflowapplication linking components subject to schema and propertiesconstraints; an executor which executes the dataflow application inparallel; and tools for accessing the functionality of the compiler,executor and component library.
 15. The system of claim 14, some of thecomponents being encrypted and comprising a proprietary datatransformation.
 16. The system of claim 14, some of the componentsincluding ports for accepting and producing data whereby the mapcomponents are linked.
 17. A computer-readable medium having a dataflowapplication development environment where map components are selectedfrom a plurality of reusable map components each representing one ormore data transformations, the selected map components are visuallyassembled into a dataflow application, patterns of parallelismrecognized, and at least some of the components executed in parallel byassigning a number of threads to a respective number of datatransformations, and at least some of the components are scalarcomponents with each scalar component executed on a separate thread. 18.The environment of claim 17, wherein the map components defineproperties affecting design behavior.
 19. The environment of claim 17,wherein the map components define properties affecting executionbehavior.
 20. The environment of claim 17, where the map components areassembled using ports for conveying data and declared as link points toother map components.